package com.myoffice.model;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TMynote entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "T_MYNOTE", schema = "OA")
public class TMynote implements java.io.Serializable {

	// Fields

	private String id;
	private TUserinfo TUserinfo;
	private String title;
	private String content;
	private Date createtime;

	// Constructors

	/** default constructor */
	public TMynote() {
	}

	/** minimal constructor */
	public TMynote(String id) {
		this.id = id;
	}

	/** full constructor */
	public TMynote(String id, TUserinfo TUserinfo, String title,
			String content, Date createtime) {
		this.id = id;
		this.TUserinfo = TUserinfo;
		this.title = title;
		this.content = content;
		this.createtime = createtime;
	}

	// Property accessors
	@Id
	@Column(name = "ID", unique = true, nullable = false)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CREATEUSER")
	public TUserinfo getTUserinfo() {
		return this.TUserinfo;
	}

	public void setTUserinfo(TUserinfo TUserinfo) {
		this.TUserinfo = TUserinfo;
	}

	@Column(name = "TITLE")
	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "CONTENT")
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "CREATETIME", length = 7)
	public Date getCreatetime() {
		return this.createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}

}